package com.qms.qep.service;

import java.util.List;
import org.springframework.web.multipart.MultipartFile;
import com.qms.qep.domain.InspectionAttachment;

/**
 * 检验附件Service接口
 * 
 * @author qms
 * @date 2025-05-14
 */
public interface IInspectionAttachmentService 
{
    /**
     * 查询检验附件
     * 
     * @param id 检验附件主键
     * @return 检验附件
     */
    public InspectionAttachment selectInspectionAttachmentById(Long id);

    /**
     * 根据任务ID查询检验附件列表
     * 
     * @param inspectionTaskId 检验任务ID
     * @return 检验附件集合
     */
    public List<InspectionAttachment> selectInspectionAttachmentByTaskId(Long inspectionTaskId);

    /**
     * 查询检验附件列表
     * 
     * @param inspectionAttachment 检验附件
     * @return 检验附件集合
     */
    public List<InspectionAttachment> selectInspectionAttachmentList(InspectionAttachment inspectionAttachment);

    /**
     * 新增检验附件
     * 
     * @param inspectionAttachment 检验附件
     * @return 结果
     */
    public int insertInspectionAttachment(InspectionAttachment inspectionAttachment);

    /**
     * 修改检验附件
     * 
     * @param inspectionAttachment 检验附件
     * @return 结果
     */
    public int updateInspectionAttachment(InspectionAttachment inspectionAttachment);

    /**
     * 批量删除检验附件
     * 
     * @param ids 需要删除的检验附件主键集合
     * @return 结果
     */
    public int deleteInspectionAttachmentByIds(Long[] ids);

    /**
     * 删除检验附件信息
     * 
     * @param id 检验附件主键
     * @return 结果
     */
    public int deleteInspectionAttachmentById(Long id);
    
    /**
     * 上传文件
     * 
     * @param file 文件
     * @param taskId 任务ID
     * @param remark 备注
     * @return 检验附件
     * @throws Exception 上传异常
     */
    public InspectionAttachment uploadFile(MultipartFile file, Long taskId, String remark) throws Exception;
} 